package fun._6742.model.dataobject;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import fun._6742.model.valueobject.CartItemVO;
import lombok.*;

@Data
@Builder
@EqualsAndHashCode(callSuper = false)
@AllArgsConstructor
@NoArgsConstructor
@TableName("cart_item")
public class CartItemDO {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private Long cartId;
    private Long productId;
    private Integer productNum;
    private Integer goodsStatus;


    public CartItemDO(CartItemVO cartItemVO) {
        this.cartId = cartItemVO.getCartId();
        this.productId = cartItemVO.getProductId();
        this.productNum = cartItemVO.getProductNum();
    }
}
